package space.jamestang.simpleci.schema

import org.ktorm.schema.Table
import org.ktorm.schema.int
import org.ktorm.schema.varchar

@Suppress("unused")
object BuildTools: Table<BuildTool>("simple_build_tools") {

    val id = int("id").primaryKey().bindTo { it.id }
    val name = varchar("name").bindTo { it.name }
    val version = varchar("version").bindTo { it.version }
    val tag = varchar("tag").bindTo { it.tag }
    val location = varchar("location").bindTo { it.location }
    val executable = varchar("executable").bindTo { it.executable }
}


// SQL:
// CREATE TABLE simple_build_tools (
//     id INT PRIMARY KEY AUTO_INCREMENT,
//     name VARCHAR(255) NOT NULL,
//     version VARCHAR(255) NOT NULL,
//     tag VARCHAR(255) NOT NULL,
//     location VARCHAR(255) NOT NULL,
//     executable VARCHAR(255) NOT NULL
// );